package org.cloud.im.admin.processor;

import lombok.extern.slf4j.Slf4j;
import org.cloud.im.admin.handler.StoreHandler;
import org.cloud.im.core.ImChannelContext;
import org.cloud.im.core.packets.ChatBody;
import org.cloud.im.core.utils.JsonKit;
import org.cloud.im.server.processor.chat.DefaultAsyncChatMessageProcessor;

/**
 * @Author: w.weidong.lin@abite.com
 * @Description: TODO
 * @Date: create in 2021/10/26 20:57
 */
@Slf4j
public class AdminWsChatMessageProcessor extends DefaultAsyncChatMessageProcessor {

    @Override
    public void doProcess(ChatBody chatBody, ImChannelContext imChannelContext){
        log.info("聊天记录{}", JsonKit.toJSONString(chatBody));
        StoreHandler.storeChat(chatBody);
    }
}
